package com.claimSettlement.service;


import com.claimSettlement.pojo.RiskType;
import com.claimSettlement.pojo.Warranty;
import com.github.pagehelper.PageInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * 保单的openfeginService类
 * 汤英杰
 */
@FeignClient("policy-microservic")
public interface PolicyOpenFeginService {
    @RequestMapping("/risk/getRiskTypeAll")
    List<RiskType> getRiskTypeAll();

    @RequestMapping("/warranty/getWarrantyAll")
    PageInfo<Warranty> getWarrantyAll(@RequestParam("page") int page);

    @RequestMapping(value = "/warranty/updateWarranty", method = RequestMethod.POST,produces = "application/json;charset=UTF-8")
    int updateWarranty(@RequestBody Warranty warranty);

    @RequestMapping("/warranty/updWarrantyState")
    int updWarrantyState(@RequestParam("warrantyState") String warrantyState,@RequestParam("warrantyId") String warrantyId);

    @RequestMapping(value = "/warranty/addWarranty", method = RequestMethod.POST)
    int addWarranty(@RequestBody Warranty warranty);

    @RequestMapping("/risk/getRiskTypeBycaseId")
    List<Integer> getRiskTypeBycaseId(@RequestParam("caseId") String caseId,@RequestParam("type") String type);

    @RequestMapping("/warranty/getWarrantyOne")
    Warranty getWarrantyOne(@RequestParam("warrantyId")  String warrantyId);

    @RequestMapping("/warranty/getWarrantyId")
    PageInfo<Warranty> getWarrantyId(@RequestParam("warrantyId") String warrantyId,@RequestParam("recognizeeName") String recognizeeName,@RequestParam("plateNumber") String plateNumber,@RequestParam("frameId") String frameId, @RequestParam("page") int page);


    @RequestMapping("/warranty/getWarrantyAll2")
    List<Warranty> getWarrantyAll2();

    @RequestMapping("/warranty/getWarrantyNow")
    String getWarrantyNow();

    @RequestMapping("/warranty/selectRisk")
    List<Integer> selectRisk(@RequestParam("warrantyId")String warrantyId);

    @RequestMapping("/warranty/insertInsure")
    int insertInsure(@RequestParam("warrantyId") String warrantyId,@RequestParam("riskTypeId") int riskTypeId);

    @RequestMapping("/warranty/updatePremiumTotal")
    int updatePremiumTotal(@RequestParam("premiumTotal") double premiumTotal, @RequestParam("warrantyId") String warrantyId);

    @RequestMapping("/warranty/getCaseChepai")
    List<String> getCaseChepai(@RequestParam("caseId") String caseId);

    @RequestMapping("/warranty/getWarrantyCount")
    int getWarrantyCount(@RequestParam("recognizeeId") String recognizeeId,@RequestParam("plateNumber") String plateNumber);
}
